package com.xx.mapper;

import com.xx.entity.Book;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface BookMapper {
    //查询所有图书信息
    List<Book> selectAll(@Param("bookName") String book_name,
                         @Param("author") String author);

    //修改图书信息
    int updateBook(@Param("price") int price,
                   @Param("bookName") String book_name,
                   @Param("author") String author,
                   @Param("id") int id,@Param("categoryId") int category_id);

    //新增图书
    int addBook(Book book);

    int updateBook(Book book);
}
